package Day004.ZuoYe01;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;

public class Test1 {
    public static void main(String[] args) throws ParseException {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入第一个生日,格式：yyyy年MM月dd日");
        String s1 = sc.next();
        System.out.println("请输入第二个生日,格式：yyyy年MM月dd日");
        String s2 = sc.next();

        SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日");
        Date date1 = sdf.parse(s1);
        Date date2 = sdf.parse(s2);

        if (date1.before(date2)){
            System.out.println("第一个生日大于第二个生日");
        } else {
            System.out.println("第一个生日小于第二个生日");
        }
    }
}
